package cn.seaboot.admin.upload.utils;

import org.springframework.web.multipart.MultipartFile;

/**
 * checked a MultipartFile is valid
 *
 * @author Mr.css
 * @version 2020-05-13 10:47
 */
public class DefaultMultipartFileValidator implements MultipartFileValidator {
    /**
     * checked MultipartFile is valid
     *
     * @param file MultipartFile
     * @return true or false
     */
    @Override
    public boolean isValid(MultipartFile file) {
        return file != null && file.getSize() > 0;
    }
}
